/////本页面没用
import request from '../utils/request'
const CONTROLLER_NAME = ''


/**
 * @description 获取用户信息
 */
export function getInfo() {
  return request({
    url: CONTROLLER_NAME + '/auth/getInfo',
    method: 'get'
  })
}

/**
 * @description 新用户登录
 * @param {string} wechatName 微信昵称
 * @param {string} headImg 头像
 * @param {string} openid  
 * @param {string} unionid
 * @param {number} phone 电话号码
 * @param {string} captcha 验证码
 */
export function loginNewly(params) {
  return request({
    url: CONTROLLER_NAME + "/auth/loginNewly",
    params,
    method: "get"
  });
}

/**
 * @description 获取验证码
 * @params {string} phone 电话号码
 */
export function getCaptcha(params) {
  return request({
    url: CONTROLLER_NAME + '/auth/getCaptcha',
    params,
    needLoading: true,
    method: 'post'
  })
}


/**
 * @description 登录并获取用户信息，如果是首次登录
 * @params {string} code wx.login 返回的code
 * @params {string} encryptedData  wx.getUserInfo 返回值
 * @params {string} iv  wx.getUserInfo 返回值
 */
export function wechatLogin(params) {
  return request({
    url: CONTROLLER_NAME + '/auth/wechat/login',
    params,
    method: 'get'
  })
}



